Repository navigation
feat: give invoke_runner and other framework entrypoint operations the CHAIN kind (RIUS-1877) - #284
PabloPardoGarcia wants to merge 1 commit into
Conversation
…e CHAIN kind (RIUS-1877)
The GenAI conventions added framework-entrypoint operations (invoke_runner,
and invoke_{framework_entrypoint} in general) and define an entrypoint as not
being an agent. kind_for_operation knew none of them, so a native runner span
got no openinference.span.kind.
The vendored kind-by-operation table gains invoke_runner from rius-semconv,
and kind_for_operation maps any other invoke_ operation the table does not
list to CHAIN. invoke_agent stays AGENT and invoke_workflow stays CHAIN.
Automated reviewNo blocking issues. Correctness. Callers. Every place that derives a kind from the operation goes through Vendored file. Tests. Nits
|
|
Landed through #289, together with the rius-semconv v1.13.0 sync. |
What
kind_for_operationmaps agen_ai.operation.namethat starts withinvoke_and is not in the kind-by-operation table toCHAIN.invoke_agentis in the table and staysAGENT;invoke_workflowstaysCHAIN. A bareinvoke_(no entrypoint name) still has no kind.src/rius/_semconv_generated.pygainsinvoke_runner: CHAINin_KIND_BY_OPERATION, from rius-semconv #112.invoke_runner, an arbitraryinvoke_crew,invoke_workflowandinvoke_agent, plus operations that only look similar (invoke_,invoke,reinvoke_runner).Why
The OpenTelemetry GenAI conventions added framework-entrypoint operations in semantic-conventions-genai#571:
invoke_runner, andinvoke_{framework_entrypoint}in general. A native runner span therefore got noopeninference.span.kindfrom the normalizer. The conventions define an entrypoint as not being an agent, so it is a CHAIN span, not AGENT. The family is open-ended, so a table cannot list it and the prefix rule lives in the helper.Vendored file: re-sync before merge
The change to
src/rius/_semconv_generated.pyis only the delta from rius-semconv #112, applied on top of the vendored v1.10.0 copy, so thesemconv-vendoredcheck fails on this branch until it is re-pinned. After #112 squash-merges and a rius-semconv release carries it, re-vendor withTAG=<that tag> scripts/sync-semconv.sh(that re-pin also brings in whatever v1.11 and v1.12 added).Testing
uv run ruff check .: passeduv run ruff format --check .: passeduv run mypy: no issues in 37 source filesuv run pytest: 2899 passed, 22 skipped, 1 xfailedscripts/sync-semconv.sh --check: fails as expected (see above)Related: RIUS-1877